package Reseau;

import java.io.IOException;
import java.net.Socket;

import javax.swing.JEditorPane;

import Utils.Parametres;

public class FluxEnvoiPing extends FluxdeString implements Runnable{
	private boolean running= true;
	private Socket socket;
	public FluxEnvoiPing(Socket socket){
		this.socket = socket;
		new Thread(this).start();
	}
	public void stop(){
		running= false;
	}
	public void run() {
		while(running){
			try {
				super.envoi(socket, "ping");
				Thread.sleep(Parametres.deltaTenvoiUDP);

			} catch (Exception e) {
				e.printStackTrace();
			}
		}

	}
}

